package de.slothsoft.commons.swing;

import java.util.List;

import javax.swing.JTable;

/**
 * A composite (like a JFrame, a JDialog or a JPanel) holding a table.
 * 
 * @author Steffi
 */
public interface ITableHolder<T> {

	/**
	 * Returns the actual table
	 * 
	 * @return the table
	 */

	JTable getTable();

	/**
	 * Returns the actual model
	 * 
	 * @return the model
	 */

	AbstractListTableModel<T> getModel();

	/**
	 * Performs a refresh on the model
	 */

	void refresh();

	/**
	 * Returns the selected elements
	 * 
	 * @return the elements
	 */

	List<T> getSelectedElements();

	/**
	 * Returns the selected element
	 * 
	 * @return the element
	 */

	T getSelectedElement();
}
